		<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
          <h1 class="page-header">我的项目</h1>
          <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>项目名称</th>
                  <th>项目类型</th>
                  <th>项目状态</th>
                  <th>项目描述</th>
                  <th>测试平台</th>
                  <th>创建时间</th>
                  <th>项目操作</th>
                </tr>
              </thead>
              <tbody>
              <#if projectList??>
              		<#list projectList as pList>
		              	<tr id="modifyProject_${pList.project_id}">
		                  <td>${pList.project_name}</td>
		                  <td>${pList.share_project_name}</td>
		                  <td class="label-success label" style="display:inline-block;">${pList.project_excute_desc}</td>
		                  <td>${pList.project_desc}</td>
		                  <td>
		                  	<#if pList.platform_type=="3">
		                  		IOS
		                  	<#elseif pList.platform_type=="2">
		                  		ANDROID
		                  	<#else>
		                  		WEB
		                  	</#if>
		                  </td>
		                  <td>${pList.create_time}</td>
		                  <input type="hidden" value="" id="projectId"/>
		                  <td>
		                  <div>
		                  <#if pList.project_excute_status==1006>
		                    <a id="${pList.report_url}" class="btn btn-primary btn-lg" onclick="project.index.downLoadReport(this.id);"><i class="glyphicon glyphicon-download-alt"></i> 下载测试报告</a>
		                  </#if>
		                  <#if pList.project_flag=="0">
		                  	<button type="button" class="btn btn-primary" data-toggle="modal"  onclick="project.index.constructeModel('${pList.project_id}','${pList.project_name}');">
							  	组件构建
						  	</button>
		                  </#if>
		                  <!-- <#if pList.project_excute_status==1000||pList.project_excute_status==1002> -->
		                  	<!-- Button trigger modal -->
		                  	<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#addLoginModal" id="${pList.project_id}" name="${pList.project_name}" title="${pList.platform_type}" onclick="project.index.initLoginParam(this);">
							 	 添加账号
							</button>
							<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modifyLoginModal" id="${pList.project_id}" name="${pList.project_name}" title="${pList.platform_type}" onclick="project.index.initUpdateInfo(this);">
							 	 修改账号
							</button>
							<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modifyModal" onclick="project.index.modifyModel('${pList.project_id}','${pList.project_name}');">
							 	 项目修改
							</button>
						  <!--  </#if> -->
							<button type="button" class="btn btn-primary" data-toggle="modal" onclick="project.index.showTreePage(this.id);" id="${pList.project_id}">
							 	 项目编辑
							</button>
							<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#delModal" onclick="project.index.delModel('${pList.project_id}','${pList.project_name}');">
							 	 项目删除
							</button>
							<button type="button" class="btn btn-primary" data-toggle="modal" onclick="project.index.queryReporter('${pList.project_id}','${pList.project_name}');">
							 	 查看报告
							</button>
		                  <#if pList.project_role_id=="3"&&pList.apply_flag=="0">
		                  	<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#authorizedProjectModal" onclick="project.index.initAuthorizedProject('${pList.project_id}','${pList.project_name}');">
							 	 项目授权
							</button>
		                  </#if>
		    			  </div>
		    			</td>
		                </tr>
              		</#list>
              </#if>
              </tbody>
            </table>
          </div>
        </div>
	<div class="pull-right pagination">
    	<ul class="pagination" style="" id='bp-3-element-lg'></ul>
	</div>
<!-- 选择需要构建的组件 -->
<div class="modal fade" id="constructeModal" tabindex="-1" role="dialog" aria-labelledby="constructeModalLabel" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="constructeModalLabel">选择组件</h4>
      </div>
      <div class="modal-body" style="margin-left:70px;">
        <!-- begin -->
        <div class="input-group input-group-lg inputElementDiv">
         <span class="input-group-addon" id="sizing-addon3">组件列表</span>
			 <select class="selectpicker" data-style="btn-info" style="height:46px;width:300px;" id="testScriptOps">
				 <option value="">请选择测试组件</option>
		      </select>
	     </div>	
        <!-- end -->
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" onclick="project.index.startToScriptTask();">确定</button>
      </div>
    </div>
  </div>
</div>
<!-- 修改项目 Modal -->
<div class="modal fade" id="modifyModal" tabindex="-1" role="dialog" aria-labelledby="modifyModalLabel" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="modifyModalLabel">Modal title</h4>
      </div>
      <div class="modal-body" id="project_detail" style="margin-left:70px;">
        <!-- begin -->
			
        <!-- end -->
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" onclick="project.index.saveProjectInfo();">保存</button>
      </div>
    </div>
  </div>
</div>
<!-- 账户管理 Modal -->
<div class="modal fade" id="addLoginModal" tabindex="-1" role="dialog" aria-labelledby="addLoginModalLabel" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="addLoginModalLabel">添加账号</h4>
      </div>
      <div class="modal-body" style="margin-left:70px;">
        <!-- begin -->
      		<div class="input-group input-group-lg inputElementDiv">
			  <span class="input-group-addon" id="sizing-addon3">企业ID</span>
			  <input class="form-control" type="hidden"  value="" id="projectId">
			    <input class="form-control" type="hidden"  value="" id="projectName">
			    <input class="form-control" type="hidden"  value="" id="platformType">
			  <input type="text" class="form-control" placeholder="企业ID" aria-describedby="sizing-addon3" id="organizationId">
			</div>
			<br/>
			<div class="input-group input-group-lg inputElementDiv">
			  <span class="input-group-addon" id="sizing-addon3">用户名</span>
			  <input type="text" class="form-control" placeholder="用户名" aria-describedby="sizing-addon3" id="loginName">
			</div>
			<br/>
			<div class="input-group input-group-lg inputElementDiv">
			  <span class="input-group-addon" id="sizing-addon3">密      码</span>
			  <input type="text" class="form-control" placeholder="密码" aria-describedby="sizing-addon3" id="loginPwd">
			</div>
        <!-- end -->
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" onclick="project.index.saveLoginInfo();">保存</button>
      </div>
    </div>
  </div>
</div>
<!-- 账户列表 -->
<div class="modal fade" id="userInfoDetail" tabindex="-1" role="dialog" aria-labelledby="userInfoDetailLabel" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="userInfoDetailLabel">账号信息</h4>
      </div>
      <div class="modal-body" style="margin-left:70px;">
        <!-- begin -->
      		<div id="userInfoDiv">
				<table class="table">
			        <thead>
			          <tr>
			          	<th>企业ID</th>
			            <th>用户名</th>
			            <th>密码</th>
			            <th>操作</th>
			          </tr>
			        </thead>
			        <tbody id="userInfoTBody">
			        	
			        </tbody>
			      </table>
			</div>
        <!-- end -->
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>

<!-- 删除项目 Modal -->
<div class="modal fade" id="delModal" tabindex="-1" role="dialog" aria-labelledby="delModalLabel" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="delModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        	确定删除项目？
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary" onclick="project.index.deleteProjectById();">删除</button>
      </div>
    </div>
  </div>
</div>
<!-- 项目授权  Modal -->
<div class="modal fade" id="authorizedProjectModal" tabindex="-1" role="dialog" aria-labelledby="authorizedProjectLabel" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="authorizedProjectLabel">项目授权</h4>
      </div>
      <div class="modal-body">
        	<div class="input-group input-group-lg">
			  <span class="input-group-addon" id="sizing-addon1">项目名称</span>
			  <input type="text" class="form-control" id="authorizedProjectName" placeholder="项目名称" aria-describedby="sizing-addon2">
			  <input type="hidden" class="form-control" id="ciProjectId" placeholder="项目id" aria-describedby="sizing-addon2">
			</div>
			<br>
			<div class="input-group input-group-lg">
			  <span class="input-group-addon" id="sizing-addon1">授权权限</span>
			  <select class="selectpicker" data-style="btn-info" style="height:46px;width:300px;" id="authorizedOps">
				 <option value="">请选择权限</option>
		      </select>
			</div>
			<br>
			<div class="input-group input-group-lg">
			  <span class="input-group-addon" id="sizing-addon1">授权人员</span>
			  <input type="text" class="form-control" disabled id="authorizedUserName" readonly placeholder="授权人员" aria-describedby="sizing-addon2" data-toggle="modal" data-target="#authorizedUserModal">
			  <input type="hidden" class="form-control" id="authorizedUserIds" aria-describedby="sizing-addon2">
			</div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary" onclick="project.index.authorizedProject();">保存</button>
      </div>
    </div>
  </div>
</div>
<!-- 授权用户弹框 -->
<div class="modal fade" id="authorizedUserModal" tabindex="-1" role="dialog" aria-labelledby="authorizedUserLabel" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="authorizedUserLabel">选择授权人</h4>
      </div>
      <div class="modal-body">
        	<!-- begin -->
        	<table class="table table-striped table-bordered bootstrap-datatable datatable responsive dataTable" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info" style="width:60%;margin-left:100px;">
			<thead>
			<tr role="row">
			<th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Username: activate to sort column descending" style="width: 251px;">Search:<input type="text" id="searchSubmitInput" aria-controls="DataTables_Table_0"><button type="button" name="searchsubmit" id="searchSubmitBtn" onclick="project.index.searchUserInfo();" value="true">搜索</button></th>
			</tr>
			</thead>
			<tbody role="alert" aria-live="polite" aria-relevant="all">
			<tr>
			<td class=" sorting_1" style="height:100px;">
			<div style="height:100px;overflow:auto;">
				<ul id="userNameLi">
				
				</ul>
			</div>
			</td>
			</tr>
			</tbody>
			</table>
        	<!-- end -->
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary" onclick="project.index.selectedUserName();">确定</button>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
	project.index.productParams.totalPages = ${totalPages};
	if(project.index.productParams.totalPages>0){
		var options = {
	            size:"large",
	            bootstrapMajorVersion:3,
	            currentPage: project.index.productParams.currentPage,
	            numberOfPages: project.index.productParams.numberOfPages,
	            totalPages:project.index.productParams.totalPages
	        };
	    var element = $('#bp-3-element-lg');
	    element.bootstrapPaginator(options);
	}
</script>
